package com.kakarote.examine.entity.PO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author: admin
 * @version: v1.0
 * @date:2023/5/25
 */

/**
 * 审批流程字段修改日志表
 */
@ApiModel(description = "审批流程字段修改日志表")
@Data
@NoArgsConstructor
@TableName(value = "wk_examine_flow_field_update_log")
public class ExamineFlowFieldUpdateLog {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 审批id
     */
    @TableField(value = "examine_id")
    @ApiModelProperty(value = "审批id")
    private Long examineId;

    /**
     * 流程节点Id
     */
    @TableField(value = "flow_id")
    @ApiModelProperty(value = "流程节点Id")
    private Long flowId;

    /**
     * 批次id
     */
    @TableField(value = "batch_id")
    @ApiModelProperty(value = "批次id")
    private String batchId;

    /**
     * 字段名称
     */
    @TableField(value = "field_name")
    @ApiModelProperty(value = "字段名称")
    private String fieldName;

    /**
     * 字段类型
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value = "字段类型")
    private Integer type;

    /**
     * 字段展示名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "字段展示名称")
    private String name;

    /**
     * 业务id
     */
    @TableField(value = "type_id")
    @ApiModelProperty(value = "业务id")
    private Long typeId;

    /**
     * label
     */
    @TableField(value = "`label`")
    @ApiModelProperty(value = "label")
    private Integer label;

    /**
     * 字段id
     */
    @TableField(value = "field_id")
    @ApiModelProperty(value = "字段id")
    private Long fieldId;

    /**
     * 修改的值
     */
    @TableField(value = "new_value")
    @ApiModelProperty(value = "修改的值")
    private String newValue;

    /**
     * 原本的值
     */
    @TableField(value = "old_value")
    @ApiModelProperty(value = "原本的值")
    private String oldValue;



    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    @TableField(value = "create_user_id")
    @ApiModelProperty(value = "创建人ID")
    private Long createUserId;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 修改人ID
     */
    @TableField(value = "update_user_id")
    @ApiModelProperty(value = "修改人ID")
    private Long updateUserId;

    /**
     * 字段来源  0.自定义 1.原始固定 2原始字段但值存在扩展表中
     */
    @TableField(value = "field_type")
    @ApiModelProperty(value = "字段来源  0.自定义 1.原始固定 2原始字段但值存在扩展表中")
    private Integer fieldType;

    @TableField(exist = false)
    private List<ExamineFlowFieldUpdateLog> fieldExtendList;
}